package com.zut.hospital.service.staff;

import com.zut.hospital.dao.staff.OfficeMapper;
import com.zut.hospital.entity.staff.Office;
import com.zut.hospital.entity.staff.OfficeExample;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author hyx
 * @date 2019/6/4 16:07
 * @description TODO
 * @Version
 */
@Service
public class OfcServiceImpl implements OfcService{

    @Autowired
    OfficeMapper officeMapper;

    @Override
    public int insertOfc(Office office) {
        return officeMapper.insertSelective(office);
    }

    @Override
    public List<Office> getAllOfc() {
        OfficeExample officeExample=new OfficeExample();
        List<Office>offices=officeMapper.selectByExample(officeExample);
        return offices;
    }
}
